{
  "cells": [
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "cellView": "form",
        "id": "II6F7ThkI10I"
      },
      "outputs": [],
      "source": [
        "#@title 🤗 AutoTrain\n",
        "#@markdown In order to use this colab\n",
        "#@markdown - Enter your [Hugging Face Write Token](https://huggingface.co/settings/tokens)\n",
        "#@markdown - Enter your [ngrok auth token](https://dashboard.ngrok.com/get-started/your-authtoken)\n",
        "huggingface_token = '' # @param {type:\"string\"}\n",
        "ngrok_token = \"\" # @param {type:\"string\"}\n",
        "\n",
        "#@markdown\n",
        "#@markdown - Attach appropriate accelerator `Runtime > Change runtime type > Hardware accelerator`\n",
        "#@markdown - click `Runtime > Run all`\n",
        "#@markdown - Follow the link to access the UI\n",
        "#@markdown - Training happens inside this Google Colab\n",
        "#@markdown - report issues / feature requests [here](https://github.com/huggingface/autotrain-advanced/issues)\n",
        "\n",
        "import os\n",
        "os.environ[\"HF_TOKEN\"] = str(huggingface_token)\n",
        "os.environ[\"NGROK_AUTH_TOKEN\"] = str(ngrok_token)\n",
        "os.environ[\"AUTOTRAIN_LOCAL\"] = \"1\"\n",
        "\n",
        "!pip install -U autotrain-advanced > install_logs.txt 2>&1\n",
        "!autotrain app --share"
      ]
    }
  ],
  "metadata": {
    "accelerator": "GPU",
    "colab": {
      "gpuType": "T4",
      "provenance": []
    },
    "kernelspec": {
      "display_name": "Python 3",
      "name": "python3"
    },
    "language_info": {
      "name": "python"
    }
  },
  "nbformat": 4,
  "nbformat_minor": 0
}
